package com.tuo51.childcare.domain.ptest;

import com.tuo51.childcare.domain.vo.PTestItemOptionVO;
import com.tuo51.foudation.model.Domain;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.Type;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.List;

@Entity
@Table(name = "user_ptest_item_record")
@EqualsAndHashCode(callSuper = true)
@Data
public class PTestItemRecord extends Domain {

    @Column(columnDefinition = "varchar(32) COMMENT '用户id'")
    private String uid;

    @Column(columnDefinition = "varchar(32) COMMENT '孩子id'")
    private String childrenId;

    @Column(columnDefinition = "int(10) DEFAULT 0 COMMENT '得分' ")
    private Integer goat;

    @Column(columnDefinition = "varchar(32) COMMENT '证书id'")
    private String certificateId;

    @Column(columnDefinition = "varchar(32) COMMENT '题目id'")
    private String itemId;

    @Type(type = "json")
    @Column(columnDefinition = "JSON COMMENT '选项：名称，分值，对应分值' ")
    private List<PTestItemOptionVO> options;


}
